package com.code.entity;

import lombok.Data;

@Data
public class CodeGenerateOption {

    private static String DEFAULT_BASE_PACKAGE_PREFIX = "";
    private static String DEFAULT_OUTPUT_DIR = "";
    private String tableName;
    private String moduleName;
    private String outputDir;
    private String basePackage;

    private String commonPackage;

    public CodeGenerateOption(String tableName, String moduleName, String commonPackage) {
        this(tableName, moduleName, DEFAULT_OUTPUT_DIR, DEFAULT_BASE_PACKAGE_PREFIX, commonPackage);
    }

    public CodeGenerateOption(String tableName, String moduleName,
                              String outputDir, String basePackage, String commonPackage) {
        this.tableName = tableName;
        this.moduleName = moduleName;
        this.outputDir = outputDir;
        this.basePackage = basePackage;
        this.commonPackage = commonPackage;
    }

    public static void setDefaultBasePackage(String prefix) {
        DEFAULT_BASE_PACKAGE_PREFIX = prefix;
    }

    public static void setDefaultOutputDir(String outputDir) {
        DEFAULT_OUTPUT_DIR = outputDir;
    }

    public static String getDefaultOutputDir() {
        return DEFAULT_OUTPUT_DIR;
    }

}
